/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import Estructuras.*;
import java.util.LinkedList;
import java.util.ListIterator;
/**
 *
 * @author Cesar Hernandez
 */
public class prueba_XML {

    public static void PrintPCB(Task_struct ts){

        System.out.println("*** Nuevo Proceso x ***");
        System.out.println("Politica: "+ts.getPolicy());
        System.out.println("Prioridad: "+ts.getPrio());
        System.out.println("Tiempo de llegada: "+ts.getArrivalTime());
        System.out.println("***************************");
    }

    public static void PrintList(LinkedList<Task_struct> li){

        ListIterator it = li.listIterator();

        while (it.hasNext()){

            PrintPCB((Task_struct) it.next());
            
        }
    }

    public static void main(String[] args) throws Exception{

        process_xml lectura = new process_xml("/home/cesrafa/Dropbox/sis_operativo02/scripts/process_request_file.xml");
        System.out.println("XML cargado");
        //lectura.lecturaPrueba();
        System.out.println("=========================");
        System.out.println("=========================");
        LinkedList<Task_struct> lista_inicial = lectura.lecturaXML();
        PrintList(lista_inicial);
    }
}

